package com.itheima.controller;

import com.itheima.pojo.User;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;

/**
 * @ClassName zengRequestController
 * @Author 16799
 * @Date 2025/10/17 11:02
 * @Version 1.0
 * @Description TODO
 **/

@RestController     //我自己写的时候，忘记加这个了，导致用postman访问接口的时候，一直是404
public class RequestControllerZeng {
    @RequestMapping("/zengjihongsimple")
    public String zsimple(String username , Integer age){
        System.out.println(username+":"+age);
        return "ok";
    }

    @RequestMapping("/zengjihongsimple2")
    public String zsimple2(@RequestParam(name = "name",required = false) String username , Integer age){
        System.out.println(username+":"+age);
        return "OK";
    }

}
